﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using BUS;

namespace Presentation
{
    public partial class Frm_Main:Form
    {
        public Frm_Main()
        {
            InitializeComponent();
        }

        #region GLOBAL VARIABLE

        #endregion

        #region PROPERTIES

        #endregion

        #region FUNCTION

        private void Form1_Load(object sender, EventArgs e)
        {
            T_LayDanhSachLoaiTietKiem();
            T_LayDanhSachThang();
        }

        private void ribbonControl1_Click(object sender, EventArgs e)
        {

        }

       




        //-------------------------- Mot ---------------------------//


        //----------------------------------------------------------//





        //-------------------------- De ---------------------------//


        //----------------------------------------------------------//





        //--------------------------Long ---------------------------//
        private void T_LayDanhSachLoaiTietKiem()
        {
            DataTable dt = new DataTable();
            T_LOAITIETKIEM_BUS ltk = new T_LOAITIETKIEM_BUS();
            dt = ltk.LayDanhSachLoaiTietKiem();
            //Frm Tra Cuu
            T_cmbTraCuuLoaiTietKiem.DataSource = dt;
            T_cmbTraCuuLoaiTietKiem.ValueMember = "MLTK";
            T_cmbTraCuuLoaiTietKiem.DisplayMember = "TenLoaiTietKiem";
            //Frm Bao Cao
            T_cmbBaoCaoLoaiTietKiem.DataSource = dt;
            T_cmbBaoCaoLoaiTietKiem.ValueMember = "MLTK";
            T_cmbBaoCaoLoaiTietKiem.DisplayMember = "TenLoaiTietKiem";
        }
      
        private void T_LayDanhSachThang()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Thang",typeof(int));
            DataRow dr;
            for (int index =0; index<12; index++)
            {
                object[] rowArray = new object[1];
                rowArray[0] = index+1;
                dr = dt.NewRow();
                dr.ItemArray = rowArray;
                dt.Rows.Add(dr);
            }
            T_cmbBaoCaoThang.DataSource = dt;
            T_cmbBaoCaoThang.DisplayMember = "Thang";
            T_cmbBaoCaoThang.ValueMember = "Thang";
        }



        //----------------------------------------------------------//





        //-------------------------- Phung ---------------------------//


        //----------------------------------------------------------//

        #endregion


    }
}